﻿using System.ComponentModel.DataAnnotations;

namespace AspAuthentication.Core
{
    /// <summary>
    /// Defines the class ProfileItem
    /// </summary>
    public class ProfileItem
    {
        /// <summary>
        /// Gets or sets the id.
        /// </summary>
        /// <value>The id.</value>
        public int Id { get; set; }
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        [Required, StringLength(250, MinimumLength = 1)]
        public string Name { get; set; }
        /// <summary>
        /// Gets or sets the value.
        /// </summary>
        /// <value>The value.</value>
        [Required, StringLength(250, MinimumLength = 1)]
        public string Value { get; set; }
        /// <summary>
        /// Gets or sets the profile.
        /// </summary>
        /// <value>The profile.</value>
        [ForeignKey("ProfileUsername"), Required]
        public Profile Profile { get; set; }
        /// <summary>
        /// Gets or sets the profile username.
        /// </summary>
        /// <value>The profile username.</value>
        [Required]
        public string ProfileUsername { get; set; }
    }
}
